package pluginMain;

import java.util.logging.Logger;
import org.bukkit.plugin.java.JavaPlugin;

public class BAKABinder extends JavaPlugin {
	public final String PLUGIN_NAME = "RemiliaNetwork " + BAKABinder.class.getName();
	public final Logger CONSOLE_LOGGER = this.getLogger();
	public static String LoreBindDrop, LoreBindStorage, LoreBindCraft, LoreBindFix, LoreBindAll;
	public static String LoreBind, LoreBinder;
	public static final String BIND_LORES_SECTION = "BindLores";
	private PlayerEventHandler eventHandler;
	public static BAKABinder instance;
	public Configer cfg;

	public void LOGCONSOLE(String msg) {
		CONSOLE_LOGGER.info(msg);
	}

	@Override
	public void onEnable() {
		instance = this;
		
		Configer.CreateDataFoler(this);
		Configer.ReleaseFileIfNotExist(this, "config.yml");
		cfg = new Configer(this, "config.yml");
		LoreBind = cfg.getString(BIND_LORES_SECTION + ".Bind");
		
		eventHandler = new PlayerEventHandler();
		getServer().getPluginManager().registerEvents(eventHandler, this);
		
		LOGCONSOLE(PLUGIN_NAME + " has been started.");
	}

	@Override
	public void onDisable() {
		LOGCONSOLE(PLUGIN_NAME + " has been disabled.");
	}

}
